package lab02.test21;

public class Test {
    public static void main(String[] args) {
        String str="xuexijavachengxuqwerefeceg";
        int num=0;
        int i;
        //利用for循环语句，遍历字符串
        for (i=0;i<str.length();i++){
            if (str.charAt(i)=='e'){
                num++;
            }

        }
        System.out.println("e出现的次数："+num);
    }
}
